namespace java org.surelink.radius.api.thrift

struct TClient {
    1: string address,
    2: string secret,
    3: string clientDesc,
    4: string clientType
}

struct TGroup{
    1: string groupName,
    2: string groupDesc,
    3: i32 status
}

struct TOnline{
    1: string clientAddress,
    2: string sessionId,
    3: string userName,
    4: string ipAddress,
    5: string macAddress,
    6: string acctStart,
    7: string nasPort,
    8: i32 startSource
}

struct TUser{
    1: string userName,
    2: string password,
    3: string groupName,
    4: i32 status
}

service ApiService {
    void setClient(1: TClient tclient),
    TClient getClient(1: string ipAddr),
    void delClient(1: string ipAddr),

    void setOnline(1: TOnline online),
    TOnline getOnline(1: string clientAddr,2: string sessionId),
    void delOnline(1: string clientAddr,2: string sessionId),
    list<TOnline> getOnlineList(1: i32 tstart,2: i32 tend),

    void setGroup(1: TGroup group),
    TGroup getGroup(1: string groupName),
    void delGroup(1: string groupName),
    string getGroupMeta(1: string groupName,2: string metaName)
    void setGroupMeta(1: string groupName,2: string metaName,3: string metaValue)

    void setUser(1: TUser user),
    TUser getUser(1: string userName),
    void delUser(1: string userName),
    string getUserMeta(1: string userName,2: string metaName)
    void setUserMeta(1: string userName,2: string metaName,3: string metaValue)
}